<%@ page contentType="text/html; charset=utf-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>爱购物-商城 - 首页</title>
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/static/css/style.css"/>
    <script type="text/javascript" src="${pageContext.request.contextPath}/static/js/function.js"></script>
    <style>
        #div1 {
            width: 770px;
            height: 110px;
            position: relative;
            overflow: hidden;
        }

        #div1 ul {
            height: 110px;
            position: relative;
        }

        #div1 ul li {
            height: 150px;
            float: left;
            list-style: none;
            padding-right: 20px;
        }

        #div1 ul li img {
            width: 100px;
            height: 100px;
            display: inline-block;
        }
    </style>
</head>
<body>
<c:import url="/front/header"/>
<div id="main" class="wrap">
    <c:import url="/front/lefter"/>

    <div class="main">
        <%--滚动插件--%>
        <div id="div1">
            <ul>
                <c:forEach var="product" items="${productPage.rows}">
                    <li>
                        <a href="${pageContext.request.contextPath}/product?id=${product.id }" target="_blank">
                        <img src="${pageContext.request.contextPath}${product.fileName }" alt="${product.description }"/></a>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </div>
    <div class="main">
        <div class="price-off">
            <h2>今日特价</h2>
            <ul class="product clearfix">
                <c:forEach var="product" items="${productPage.rows}" end="7">
                    <li>
                        <dl>
                            <dt>
                                <a href="${pageContext.request.contextPath}/product?id=${product.id }" target="_blank">
                                <img src="${pageContext.request.contextPath}${product.fileName }" alt="${product.description }"/></a>
                            </dt>
                            <dd class="title">
                                <a href="${pageContext.request.contextPath}/product?id=${product.id }" target="_blank">${product.description }</a>
                            </dd>
                            <dd class="price">￥${product.price }</dd>
                        </dl>
                    </li>
                </c:forEach>
            </ul>
        </div>
        <div class="side">
            <div class="news-list">
                <h4>新闻动态</h4>
                <ul>
                    <c:forEach var="n" items="${newsPage.rows}">
                        <li><a href="${pageContext.request.contextPath}/news?id=${n.id }" target="_blank">${n.title }</a></li>
                    </c:forEach>
                </ul>
            </div>
            <div class="spacer"></div>

        </div>
        <div class="spacer clear"></div>
        <div class="hot">
            <h2>热卖推荐</h2>
            <ul class="product clearfix">
                <c:forEach var="hotp" items="${productPage.rows}">
                    <li>
                        <dl>
                            <dt><a href="${pageContext.request.contextPath}/product?id=${hotp.id }" target="_blank"><img
                                    src="${pageContext.request.contextPath}${hotp.fileName }"/></a></dt>
                            <dd class="title">
                                <a href="${pageContext.request.contextPath}/product?id=${hotp.id }"
                                   alt="${hotp.description }"  target="_blank">${hotp.description}</a></dd>
                            <dd class="price">￥${hotp.price }</dd>
                        </dl>
                    </li>
                </c:forEach>
            </ul>
        </div>
    </div>
    <div class="clear"></div>
</div>
<c:import url="/static/page/footer.jsp"/>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/index-scorll.js"></script>
</body>
</html>


